<template>
  <div class="search-nav">
    <el-form :inline="true" :model="formInline" class="form-inline">
      <el-form-item label="" class="inputDeep">
        <el-input
          v-model="formInline.pipeGallery"
          class="w-50 m-2"
          placeholder="请输入管廊名称"
        >
          <template #prefix>
            <el-icon class="el-input__icon" @click="onSubmit"
              ><Search
            /></el-icon>
          </template>
        </el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { reactive, ref, defineEmits } from 'vue'
import { Search } from '@element-plus/icons-vue'
const emits = defineEmits(['onSearch'])
const formInline = reactive({
  equipmentName: ''
})
const onSubmit = () => {
  emits('onSearch', formInline.pipeGallery)
}
</script>

<style lang="scss" scoped>
.form-inline {
  width: 100%;
  position: relative;
  :deep(.inputDeep .el-input__inner) {
    border-radius: 55px;
    background: rgba(255, 255, 255, 0.39);
    width: 215px;
    height: 36px;
  }
}
:deep(.el-input__prefix) {
  cursor: pointer;
  svg {
    margin-top: 10px;
    width: 16px;
    height: 16px;
  }
}
</style>
